#include<iostream>
#include<algorithm>
#define MAX 100001
using namespace std;

int diamonds[MAX];

int main(){
	int N,M,input;
	while(cin>>N>>M){
		int minlost = 99999999;
		int low = 0;
		bool notFound = true;
		fill(diamonds,diamonds+MAX,0);
		for(int i=1;i<=N;i++){
			cin>>diamonds[i];
			diamonds[i]+=diamonds[i-1];
			while(diamonds[i] - diamonds[low]>M){
				minlost = min(minlost,diamonds[i] - diamonds[low]);
				low++;
			}
			if(diamonds[i] - diamonds[low] == M){
				cout<<low+1<<"-"<<i<<endl;
				notFound = false;
			}
		}
		if(notFound){
			low = 0;
			for(int i=1;i<=N;i++){
				while(diamonds[i] - diamonds[low]>minlost){
					low++;
				}
				if(diamonds[i] - diamonds[low]==minlost){
					cout<<low+1<<"-"<<i<<endl;
				}
			}
		}
	}	
	return 0;
}
